<template>
  <div class="screen-shot-container">
    <div class="screen-shot-pane">
      <div class="screen-shot-button" @click="handleScreenshot">屏幕截图</div>
    </div>
  </div>
</template>
<script setup lang="ts">
import { startScreenshotOverlay } from "@/utils/tauri";

const handleScreenshot = async () => {
  try {
    await startScreenshotOverlay();
  } catch (error) {
    console.error("启动屏幕截图遮罩失败:", error);
  }
};
</script>
<style lang="scss" scoped>
.screen-shot-container {
  display: flex;
  gap: 20px;
  padding: 20px;
  height: 100vh;
  box-sizing: border-box;
  background-color: transparent;
}
.screen-shot-pane {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
}
.screen-shot-button {
  width: 200px;
  height: 100px;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  text-align: center;
  line-height: 100px;
  color: #303133;
}
</style>
